import request from '@/utils/request'
//新增学员信息
export function addStudentInfo(data) {
    return request({
        url: '/student/info/enter',
        method: 'post',
        data: data
    })
}

//查询学校初始学员信息
export function originalData(data) {
    return request({
        url: "/student/info/page",
        method: 'post',
        data: data
    })
}
//修改学员信息
export function updateInfo(data) {
    return request({
        url: "/student/info/update",
        method: 'PUT',
        data: data
    })
}

//批量修改学员信息
export function updateBatchInfo(data) {
    return request({
        url: "/student/info/updateBatch",
        method: 'PUT',
        data: data
    })
}

//删除学员信息
export function delt(id) {
    return request({
        url: '/student/info/delete/'+id,
        method: 'DELETE'
    })
}

export function findStudentInfoByClass(data){
    return request({
        url: '/student/info/findByClass',
        method: 'post',
        data: data
    })
}

export function resetPwd(data){
    return request({
        url: '/student/info/resetPwd/' + data.id,
        method: 'post'
    })
}

export function resetParentPwd(data){
    return request({
        url: '/student/info/parent/resetPwd/' + data.id,
        method: 'post'
    })
}

//批量删除学员信息
export function studentsInfoDelete(data) {
    return request({
        url: "/student/info/deleteBatchStudentInfo",
        method: "post",
        data: data
    });
}

//批量重置学生密码
export function resetStudentsPwd(data) {
    return request({
        url: "/student/info/batchResetStudentsPwd",
        method: "post",
        data: data
    });
}
//批量重置家长密码
export function resetParentsPwd(data) {
    return request({
        url: "/student/info/batchResetParentsPwd",
        method: "post",
        data: data
    });
}

//查询全部班级
export function findAllSchoolClass(data){
    return request({
        url: '/classInfo/findAllSchoolClass',
        method: 'get'
    })
}


//查询学员详情
export function findStudentDetailById(id){
    return request({
        url: '/student/info/get/'+id,
        method: 'get'
    })
}

//查询学员详情
export function findTuitionFee(id){
    return request({
        url: '/student/info/findTuitionFee/'+id,
        method: 'get'
    })
}

export function exportStudent() {
    return request({
        url: "/student/info/excel/exportStudent",
        responseType:'blob',
        method:'get',
    })
}

export function deviceStudentExcelList(data) {
    return request({
        url: "/student/info/excel/importTemplate",
        method:'get',
        params:data,
        timeout:0
    })
}

export function exportDormitoryTemplate() {
    return request({
        url: "/student/info/importTemplate/domitoryExcelTemplate",
        responseType:'blob',
        method:'get',
    })
}

//学员退宿
export function studentRetreat(data) {
    return request({
        url: "/student/info/studentRetreat",
        method: "post",
        data: data
    });
}

